<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CAD: E:/OpenSourceProjects/xh-cad/Src/Visualization/VTKRenderer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  $(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">CAD<span id="projectnumber">&#160;1.0</span>
   </div>
  </td>
    <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('_v_t_k_renderer_8h_source.html',''); initResizable(true); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">VTKRenderer.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="preprocessor">#include&lt;TopoDS_Shape.hxx&gt;</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#include&lt;vtkRenderWindow.h&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#include&lt;vtkRenderer.h&gt;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#include&lt;vtkRenderWindowInteractor.h&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#include&lt;vtkInteractorStyleTrackballCamera.h&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include&lt;vtkActor.h&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include&lt;vtkTextActor.h&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include&lt;vtkPolyDataMapper.h&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include&lt;vtkButtonWidget.h&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include&lt;vtkTexturedButtonRepresentation2D.h&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include&lt;vtkCellPicker.h&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#include&lt;vtkAreaPicker.h&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="keyword">class </span><a class="code hl_class" href="class_v_t_k_renderer.html">VTKRenderer</a>;</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span></div>
<div class="foldopen" id="foldopen00020" data-start="{" data-end="};">
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="class_custom_interactor_style.html">   20</a></span><span class="keyword">class </span><a class="code hl_class" href="class_custom_interactor_style.html">CustomInteractorStyle</a> : <span class="keyword">public</span> vtkInteractorStyleTrackballCamera </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span>{</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span>    <span class="keyword">static</span> <a class="code hl_class" href="class_custom_interactor_style.html">CustomInteractorStyle</a>* New();</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>    vtkTypeMacro(<a class="code hl_class" href="class_custom_interactor_style.html">CustomInteractorStyle</a>, vtkInteractorStyleTrackballCamera);</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_custom_interactor_style.html#a0d830328ca860e97ce908d0d37e80e18">SetRenderer</a>(<a class="code hl_class" href="class_v_t_k_renderer.html">VTKRenderer</a>* renderer);</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_custom_interactor_style.html#ae8ac0733139cebd54a73caf9de469964">OnLeftButtonDown</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_custom_interactor_style.html#a565a9d289a04048a80b87968ede8d55e">OnLeftButtonUp</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_custom_interactor_style.html#a3d5f0741b3dc7551f9f151c18b117100">OnMiddleButtonDown</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_custom_interactor_style.html#ace7f6796ec9a2adaecbbd30b87964db6">OnMiddleButtonUp</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_custom_interactor_style.html#abef084b531c117e43e811efacbc3ff1e">OnMouseMove</a>() <span class="keyword">override</span>;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>    <a class="code hl_class" href="class_v_t_k_renderer.html">VTKRenderer</a>*    m_Renderer = <span class="keyword">nullptr</span>;       <span class="comment">// 关联的渲染器实例</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>    <span class="keywordtype">bool</span>            m_IsRotating = <span class="keyword">false</span>;       <span class="comment">// 是否正在旋转</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    <span class="keywordtype">bool</span>            m_IsPanning = <span class="keyword">false</span>;        <span class="comment">// 是否正在平移</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>    <span class="keywordtype">bool</span>            m_IsSelecting = <span class="keyword">false</span>;      <span class="comment">// 是否正在选择（单选/框选）</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>    <span class="keywordtype">bool</span>            m_IsMouseMoveing = <span class="keyword">false</span>;   <span class="comment">// 鼠标是否移动（用于判断是单选还是框选）</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>    <span class="keywordtype">int</span>             m_StartPos[2];              <span class="comment">// 框选起始位置</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>};</div>
</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span></div>
<div class="foldopen" id="foldopen00058" data-start="{" data-end="};">
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="class_v_t_k_renderer.html">   58</a></span><span class="keyword">class </span>VTKRenderer</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>{</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>    <span class="keyword">static</span> VTKRenderer&amp; getInstance();</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#aec4d65360fb4e36ab93edf4a47b489a4">Initialize</a>();</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#a7588cdde69ced800534c1fafb7dfb7dc">Rendering</a>(<span class="keywordtype">bool</span> HighAPI = <span class="keyword">true</span>);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#ad8dc7a662f0d143d8d9e550034dabbab">SwitchRenderAPI</a>();</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#ab44d8a209966aa15608e907e2f8da0ea">ClearAllModels</a>();</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#a22f0719e99fe07571d9f3bfab9deb99a">AddModel</a>(TopoDS_Shape shape);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#a8d6f8e7b8357c407d0171b5680484bb0">RemoveModel</a>();</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#abc31eb541ebe37304181a54178523f0e">HandleSingleSelection</a>(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_v_t_k_renderer.html#ad35d2253adc82918bf892811fd5dd3be">HandleBoxSelection</a>(<span class="keywordtype">int</span>* pos1, <span class="keywordtype">int</span>* pos2);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    VTKRenderer();</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>    ~VTKRenderer();</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>    VTKRenderer(<span class="keyword">const</span> VTKRenderer&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>    VTKRenderer&amp; operator=(<span class="keyword">const</span> VTKRenderer&amp;) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    <span class="keywordtype">void</span> UpdateModel();</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>    </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>    <span class="keywordtype">void</span> CreateSwitchAPIButton();</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>    </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    <span class="keywordtype">void</span> InitialMouseEvent();</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>    <span class="keywordtype">void</span> UpdateMousePosition(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y);    </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>    </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>    <span class="keywordtype">void</span> ClearHighLightState();</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>    <span class="comment">// 窗口组件</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>    vtkNew&lt;vtkRenderWindow&gt;                     m_RenderWindow;         <span class="comment">// 渲染窗口</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>    vtkNew&lt;vtkRenderer&gt;                         m_Renderer;             <span class="comment">// 渲染器</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>    vtkNew&lt;vtkRenderWindowInteractor&gt;           m_Interactor;           <span class="comment">// 渲染窗口交互器</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>    vtkNew&lt;CustomInteractorStyle&gt;               m_InteractorStyle;      <span class="comment">// 自定义交互器样式</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>    vtkNew&lt;vtkCallbackCommand&gt;                  m_RenderCallback;       <span class="comment">// 渲染回调函数</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>    <span class="keywordtype">bool</span>                                        m_Isrendering = <span class="keyword">false</span>;  <span class="comment">// 窗口交互器是否已经开始渲染</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>    </div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>    <span class="comment">// 当前模型</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>    vtkNew&lt;vtkActor&gt;                            m_CurrentActor;</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>    vtkNew&lt;vtkPolyDataMapper&gt;                   m_CurrentMapper;</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>    TopoDS_Shape                                m_shape;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>    </div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>    <span class="comment">// API切换按钮组件</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>    vtkNew&lt;vtkButtonWidget&gt;                     m_ButtonWidget;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    vtkNew&lt;vtkTexturedButtonRepresentation2D&gt;   m_ButtonRep;</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>    <span class="comment">// High/LowAPI切换状态</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>    <span class="keywordtype">bool</span>                                        m_UseHighAPI = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>    <span class="comment">// 鼠标左键单选/框选相关</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>    vtkNew&lt;vtkTextActor&gt;                        m_MousePositionText;    <span class="comment">// 鼠标位置文本</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span>    vtkNew&lt;vtkCellPicker&gt;                       m_CellPicker;           <span class="comment">// 单元拾取器</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    vtkNew&lt;vtkAreaPicker&gt;                       m_AreaPicker;           <span class="comment">// 区域拾取器</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    vtkNew&lt;vtkActor&gt;                            m_HighlightedActor;     <span class="comment">// 当前高亮Actor</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>    std::vector&lt;vtkActor*&gt;                      m_SelectedActors;       <span class="comment">// 框选Actor集合</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>    <span class="keywordtype">int</span>                                         m_StartPos[2];          <span class="comment">// 拖拽起始位置</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>};</div>
</div>
<div class="ttc" id="aclass_custom_interactor_style_html"><div class="ttname"><a href="class_custom_interactor_style.html">CustomInteractorStyle</a></div><div class="ttdoc">自定义交互样式类</div><div class="ttdef"><b>Definition</b> VTKRenderer.h:21</div></div>
<div class="ttc" id="aclass_custom_interactor_style_html_a0d830328ca860e97ce908d0d37e80e18"><div class="ttname"><a href="class_custom_interactor_style.html#a0d830328ca860e97ce908d0d37e80e18">CustomInteractorStyle::SetRenderer</a></div><div class="ttdeci">void SetRenderer(VTKRenderer *renderer)</div><div class="ttdoc">设置关联的VTKRenderer实例</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:27</div></div>
<div class="ttc" id="aclass_custom_interactor_style_html_a3d5f0741b3dc7551f9f151c18b117100"><div class="ttname"><a href="class_custom_interactor_style.html#a3d5f0741b3dc7551f9f151c18b117100">CustomInteractorStyle::OnMiddleButtonDown</a></div><div class="ttdeci">void OnMiddleButtonDown() override</div><div class="ttdoc">中键按下</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:83</div></div>
<div class="ttc" id="aclass_custom_interactor_style_html_a565a9d289a04048a80b87968ede8d55e"><div class="ttname"><a href="class_custom_interactor_style.html#a565a9d289a04048a80b87968ede8d55e">CustomInteractorStyle::OnLeftButtonUp</a></div><div class="ttdeci">void OnLeftButtonUp() override</div><div class="ttdoc">左键抬起</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:50</div></div>
<div class="ttc" id="aclass_custom_interactor_style_html_abef084b531c117e43e811efacbc3ff1e"><div class="ttname"><a href="class_custom_interactor_style.html#abef084b531c117e43e811efacbc3ff1e">CustomInteractorStyle::OnMouseMove</a></div><div class="ttdeci">void OnMouseMove() override</div><div class="ttdoc">鼠标移动</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:99</div></div>
<div class="ttc" id="aclass_custom_interactor_style_html_ace7f6796ec9a2adaecbbd30b87964db6"><div class="ttname"><a href="class_custom_interactor_style.html#ace7f6796ec9a2adaecbbd30b87964db6">CustomInteractorStyle::OnMiddleButtonUp</a></div><div class="ttdeci">void OnMiddleButtonUp() override</div><div class="ttdoc">中键抬起</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:91</div></div>
<div class="ttc" id="aclass_custom_interactor_style_html_ae8ac0733139cebd54a73caf9de469964"><div class="ttname"><a href="class_custom_interactor_style.html#ae8ac0733139cebd54a73caf9de469964">CustomInteractorStyle::OnLeftButtonDown</a></div><div class="ttdeci">void OnLeftButtonDown() override</div><div class="ttdoc">左键按下</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:32</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html"><div class="ttname"><a href="class_v_t_k_renderer.html">VTKRenderer</a></div><div class="ttdoc">VTK渲染器</div><div class="ttdef"><b>Definition</b> VTKRenderer.h:59</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_a22f0719e99fe07571d9f3bfab9deb99a"><div class="ttname"><a href="class_v_t_k_renderer.html#a22f0719e99fe07571d9f3bfab9deb99a">VTKRenderer::AddModel</a></div><div class="ttdeci">void AddModel(TopoDS_Shape shape)</div><div class="ttdoc">添加模型</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:216</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_a7588cdde69ced800534c1fafb7dfb7dc"><div class="ttname"><a href="class_v_t_k_renderer.html#a7588cdde69ced800534c1fafb7dfb7dc">VTKRenderer::Rendering</a></div><div class="ttdeci">void Rendering(bool HighAPI=true)</div><div class="ttdoc">渲染</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:166</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_a8d6f8e7b8357c407d0171b5680484bb0"><div class="ttname"><a href="class_v_t_k_renderer.html#a8d6f8e7b8357c407d0171b5680484bb0">VTKRenderer::RemoveModel</a></div><div class="ttdeci">void RemoveModel()</div><div class="ttdoc">移除模型</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:221</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_ab44d8a209966aa15608e907e2f8da0ea"><div class="ttname"><a href="class_v_t_k_renderer.html#ab44d8a209966aa15608e907e2f8da0ea">VTKRenderer::ClearAllModels</a></div><div class="ttdeci">void ClearAllModels()</div><div class="ttdoc">清除场景中的模型</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:197</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_abc31eb541ebe37304181a54178523f0e"><div class="ttname"><a href="class_v_t_k_renderer.html#abc31eb541ebe37304181a54178523f0e">VTKRenderer::HandleSingleSelection</a></div><div class="ttdeci">void HandleSingleSelection(int x, int y)</div><div class="ttdoc">鼠标左键单选</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:226</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_ad35d2253adc82918bf892811fd5dd3be"><div class="ttname"><a href="class_v_t_k_renderer.html#ad35d2253adc82918bf892811fd5dd3be">VTKRenderer::HandleBoxSelection</a></div><div class="ttdeci">void HandleBoxSelection(int *pos1, int *pos2)</div><div class="ttdoc">鼠标左键框选</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:244</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_ad8dc7a662f0d143d8d9e550034dabbab"><div class="ttname"><a href="class_v_t_k_renderer.html#ad8dc7a662f0d143d8d9e550034dabbab">VTKRenderer::SwitchRenderAPI</a></div><div class="ttdeci">void SwitchRenderAPI()</div><div class="ttdoc">切换渲染模式</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:188</div></div>
<div class="ttc" id="aclass_v_t_k_renderer_html_aec4d65360fb4e36ab93edf4a47b489a4"><div class="ttname"><a href="class_v_t_k_renderer.html#aec4d65360fb4e36ab93edf4a47b489a4">VTKRenderer::Initialize</a></div><div class="ttdeci">void Initialize()</div><div class="ttdoc">初始化渲染器</div><div class="ttdef"><b>Definition</b> VTKRenderer.cpp:129</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_413f4e031a85da0d68269c6fd2f76e1c.html">Src</a></li><li class="navelem"><a class="el" href="dir_92c74a32d4ae91ec1a8fbbd584996936.html">Visualization</a></li><li class="navelem"><b>VTKRenderer.h</b></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2 </li>
  </ul>
</div>
</body>
</html>
